package com.tkjt.pms.calc.formula.common;

import java.util.HashMap;
import java.util.Map;

public class EngineResult {
	
	private String retCode = FormulaConsts.RET_SUCCESS;
	private String retMsg = "success";
	private Map<String, Double> calcColumnValues = new HashMap<String, Double>();
	private Map<String, FormulaCells> formulaCellsMap = new HashMap<String, FormulaCells>();
	
	public String getRetCode() {
		return retCode;
	}

	public void setRetCode(String retCode) {
		this.retCode = retCode;
	}

	public String getRetMsg() {
		return retMsg;
	}

	public void setRetMsg(String retMsg) {
		this.retMsg = retMsg;
	}
	
	public boolean isSuccess() {
		return FormulaConsts.RET_SUCCESS.equals(this.retCode);
	}
	
	public Map<String, Double> getCalcColumnValues(){
		return calcColumnValues;
	}
	
	public Double getCalcColumnValue(String dataColumn){
		return calcColumnValues.get(dataColumn);
	}
	
	public void addCalcColumnValue(String dataColumn, Double value) {
		calcColumnValues.put(dataColumn, value);
	}
	
	public Map<String, FormulaCells> getCalcFormulaCells(){
		return formulaCellsMap;
	}
	
	public FormulaCells getCalcFormulaCells(String dataColumn){
		return formulaCellsMap.get(dataColumn);
	}
	
	public void addCalcFormulaCells(String dataColumn, FormulaCells formulaCells) {
		formulaCellsMap.put(dataColumn, formulaCells);
	}

}
